package com.infoland.afanmall.model.my.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutCompat;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.blankj.utilcode.util.ToastUtils;
import com.infoland.afanmall.R;
import com.infoland.afanmall.base.util.StatusBarKit;
import com.infoland.afanmall.base.util.ToolsKit;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 个人信息界面Activity
 */
public class PersonMesgActivity extends AppCompatActivity {
    @BindView(R.id.person_back)
    ImageView personBack;
    @BindView(R.id.person_img)
    ImageView personImg;
    @BindView(R.id.person_ll_head)
    LinearLayoutCompat personLlHead;
    @BindView(R.id.person_name)
    TextView personName;
    @BindView(R.id.person_ll_name)
    LinearLayoutCompat personLlName;
    @BindView(R.id.person_sex)
    TextView personSex;
    @BindView(R.id.person_ll_sex)
    LinearLayoutCompat personLlSex;
    @BindView(R.id.person_ll_manage)
    LinearLayoutCompat personLlManage;
    @BindView(R.id.person_phone_number)
    TextView personPhoneNumber;
    @BindView(R.id.person_ll_phone)
    LinearLayoutCompat personLlPhone;
    @BindView(R.id.title_layout)
    LinearLayout titleLayout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.my_msg_activity);
        ButterKnife.bind(this);
        StatusBarKit.immersiveBlackTitleText(this, titleLayout);
        initData();
    }

    private void initData() {

    }

    @OnClick({R.id.person_back, R.id.person_img, R.id.person_ll_head, R.id.person_ll_name, R.id.person_sex, R.id.person_ll_sex, R.id.person_ll_manage, R.id.person_ll_phone})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            /***返回*/
            case R.id.person_back:
                finish();
                break;
            /***修改头像*/
            case R.id.person_ll_head:
                ToastUtils.showShort("修改头像");
                break;
            /***操作昵称*/
            case R.id.person_ll_name:
                ToolsKit.go(UpdateNameActivity.class);
                ToastUtils.showShort("操作昵称");
                break;
            /***操作性别*/
            case R.id.person_ll_sex:
                ToastUtils.showShort("操作性别");
                break;
            /***操作账号*/
            case R.id.person_ll_manage:
                ToastUtils.showShort("操作账号");
                break;
            /***操作电话*/
            case R.id.person_ll_phone:
                ToolsKit.go(UpdatePhoneActivity.class);

                ToastUtils.showShort("操作电话");
                break;
        }
    }

    @Override
    protected void onDestroy() {
        ToolsKit.deleteOKHttp(this);
        super.onDestroy();
    }
}
